﻿/*
* 创建者：LIYINFAI
* 创建时间：2023/10/24 9:35:26
* 描述：
* --------------------------------------
* 修改说明：
* --------------------------------------
*/
using System.ComponentModel;

namespace CommonLibrary
{
    /// <summary>
    /// NG原因
    /// </summary>
    public enum ENGCode : short
    {
        /// <summary>
        /// 10扫码NG
        /// </summary>
        NG_SCAN = 10,
        /// <summary>
        /// 20氦检NG
        /// </summary>
        NG_HELIUM = 20,
        /// <summary>
        /// 25背景漏率NG
        /// </summary>
        NG_BACK_HELIUM = 25,
        /// <summary>
        /// 30耐压NG
        /// </summary>
        NG_WITHSTAND = 30,
        /// <summary>
        /// 35耐压接触不良NG
        /// </summary>
        NG_WITHSTAND_CONT = 35,
        /// <summary>
        /// 40绝缘电阻NG
        /// </summary>
        NG_INSULATION = 40,
        /// <summary>
        /// 45绝缘电阻NG
        /// </summary>
        NG_INSULATION_CONT = 45,
        /// <summary>
        /// 50出站NG
        /// </summary>
        NG_OUT = 50,
        /// <summary>
        /// 100OK
        /// </summary>
        OK = 100
    }
    /// <summary>
    /// HIOKI3153 状态
    /// </summary>
    public enum EHIOKI3153State
    {
        /// <summary>
        /// Withstand-voltage mode PASS
        /// </summary>
        WPASS,//
        /// <summary>
        /// Insulation-resistance mode PASS
        /// </summary>
        IPASS,//
        /// <summary>
        /// Withstand-voltage mode UPPER FAIL
        /// </summary>
        WULFAIL,//
        /// <summary>
        /// Insulation-resistance mode UPPER FAIL
        /// </summary>
        IULFAIL,//
        /// <summary>
        /// Withstand-voltage mode UPPER FAIL
        /// </summary>
        WUFAIL,//
        /// <summary>
        /// Insulation-resistance mode UPPER FAIL
        /// </summary>
        IUFAIL,//
        /// <summary>
        /// Withstand-voltage mode LOWER FAIL
        /// </summary>
        WLFAIL,//
        /// <summary>
        /// Insulation-resistance ode LOWER FAIL
        /// </summary>
        ILFAIL,//
        /// <summary>
        /// Withstand-volatage mode READY
        /// </summary>
        WREADY,//
        /// <summary>
        /// Insulation-resistance mode READY
        /// </summary>
        IREADY,//
        /// <summary>
        /// Withstans-voltage mode TEST
        /// </summary>
        WTEST,//
        /// <summary>
        /// Insulation-resistance mode TEST
        /// </summary>
        ITEST,//
        /// <summary>
        /// Other(Aborts a test)
        /// </summary>
        NULL,
    }
    /// <summary>
    /// 氦检软件名称
    /// </summary>
    public enum EHeiumSoftwareName
    {
        /// <summary>
        /// 一次氦检
        /// </summary>
        [Description("一次氦检")]
        ONE = 1,
        /// <summary>
        /// 二次氦检
        /// </summary>
        [Description("二次氦检")]
        TWO = 2,
    }
    /// <summary>
    /// HIOKI3153 时间类型
    /// </summary>
    public enum EHIOKI3153TimeType : short
    {
        /// <summary>
        /// 测试时间
        /// </summary>
        TEST_TIME = 0,
        /// <summary>
        /// 上升时间
        /// </summary>
        RAMP_UP_TIME = 1,
        /// <summary>
        /// 下降时间
        /// </summary>
        RAMP_DOWN_TIME = 2
    }

    /// <summary>
    /// PLC反馈的运行状态
    /// </summary>
    public enum EPLCState : short
    {
        /// <summary>
        /// 手动状态
        /// </summary>
        [Description("手动状态")]
        Maintain = 10,
        /// <summary>
        /// 初始化状态
        /// </summary>
        [Description("初始化状态")]
        Init = 20,
        /// <summary>
        /// 复位中
        /// </summary>
        [Description("复位中")]
        Reseting = 30,
        /// <summary>
        /// 复位完成
        /// </summary>
        [Description("复位完成")]
        Reseted = 40,
        /// <summary>
        /// 运行中间状态
        /// </summary>
        [Description("运行中间状态")]
        InRunning = 50,
        /// <summary>
        /// 自动运行中
        /// </summary>
        [Description("自动运行中")]
        AutoRunning = 60,
        /// <summary>
        /// 设备停止中
        /// </summary>
        [Description("设备停止中")]
        Stoping = 70,
        /// <summary>
        /// 设备故障报警
        /// </summary>
        [Description("设备故障报警")]
        Alarm = 80,
        /// <summary>
        /// 空闲
        /// </summary>
        [Description("空闲")]
        Idle = 0,
        /// <summary>
        /// 正常运行
        /// </summary>
        [Description("正常运行")]
        Normal = 1,
        /// <summary>
        /// 停机
        /// </summary>
        [Description("停机")]
        Shutdown = 2,
        /// <summary>
        /// 故障
        /// </summary>
        [Description("故障")]
        Turnover = 3
        //1：正常运行，2：停机，3：故障
        //10手动 20初始化状态 30复位中 40复位完成 运行中间状态 60自动运行中 70设备停止中 80设备故障报警
    }
    /// <summary>
    /// 登陆类型
    /// </summary>
    public enum ELoginType
    {
        /// <summary>
        /// 用户名登陆
        /// </summary>
        [Description("用户名登陆")]
        USERNAME = 0,
        /// <summary>
        /// 刷卡登陆
        /// </summary>
        [Description("刷卡登陆")]
        CARD = 1
    }
    /// <summary>
    /// 用户权限
    /// </summary>
    public enum EPower
    {
        /// <summary>
        /// 游客
        /// </summary>
        [Description("游客")]
        NONE = 0,
        /// <summary>
        /// 操作员
        /// </summary>
        [Description("操作员")]
        OPT = 1,
        /// <summary>
        /// 技术员
        /// </summary>
        [Description("技术员")]
        IT = 2,
        /// <summary>
        /// 工程师
        /// </summary>
        [Description("工程师")]
        ENG = 3,
        /// <summary>
        /// 管理员
        /// </summary>
        [Description("管理员")]
        ADMIN = 4
    }
    /// <summary>
    /// barcode结果
    /// </summary>
    public enum EBarcodeCheckResult : short
    {
        /// <summary>
        /// 未知
        /// </summary>
        NONE = 0,
        /// <summary>
        /// 正常
        /// </summary>
        OK = 1,
        /// <summary>
        /// NG
        /// </summary>
        NG = 2,
        /// <summary>
        /// 长度异常
        /// </summary>
        ERROR_LENGTH = 3,
        /// <summary>
        /// 前缀异常
        /// </summary>
        ERROR_PREV = 4,
        /// <summary>
        /// 后缀异常
        /// </summary>
        ERROR_END = 5,
    }

    /// <summary>
    /// 设备通讯类型
    /// </summary>
    public enum ECommunicationType
    {
        /// <summary>
        /// 串口
        /// </summary>
        SERIAL = 0,
        /// <summary>
        /// TCP
        /// </summary>
        TCP = 1,
        /// <summary>
        /// Modbus TCP
        /// </summary>
        MODBUS_TCP = 2,
        /// <summary>
        /// 手动串口
        /// </summary>
        MANUAL_SERIAL = 3,
        /// <summary>
        /// Modbus RTU
        /// </summary>
        MODBUS_RTU = 4
    }

    /// <summary>
    /// 行为类型
    /// </summary>
    public enum EHandlerType
    {
        /// <summary>
        /// 自动扫码
        /// </summary>
        SCAN = 0,
        /// <summary>
        /// 手动扫码
        /// </summary>
        MANUAL_SCAN = 1,
        /// <summary>
        /// 天平称重
        /// </summary>
        GAGF_GETWEIGHT = 2,
        /// <summary>
        /// 天平清零
        /// </summary>
        GAGF_REZERO = 3,
        /// <summary>
        /// 背景漏率检测
        /// </summary>
        HELIUM_BACKLEAKRATE = 4,
        /// <summary>
        /// 氦检
        /// </summary>
        HELIUM_HELIUM = 5,
        /// <summary>
        /// RJ6902 HiPot
        /// </summary>
        HiPot_RJ6902 = 6,
        /// <summary>
        /// RJ6902 HiPot Query Parameters
        /// </summary>
        HiPot_RJ6902_Query_Parameters = 7,
        /// <summary>
        /// ST5520_RESULT_JUDGE
        /// </summary>
        ST5520_RESULT_JUDGE = 8,
        /// <summary>
        /// H3153_RESULT_JUDGE
        /// </summary>
        H3153_RESULT_JUDGE = 9
    }

    /// <summary>
    /// 数据格式
    /// </summary>
    public enum EDataFormat
    {
        /// <summary>
        /// ABCD
        /// </summary>
        ABCD = 0,
        /// <summary>
        /// BADC
        /// </summary>
        BADC = 1,
        /// <summary>
        /// CDAB
        /// </summary>
        CDAB = 2,
        /// <summary>
        /// DCBA
        /// </summary>
        DCBA = 3
    }
    /// <summary>
    /// PLC设备类型
    /// </summary>
    public enum EPLCDeviceType
    {
        /// <summary>
        /// 三菱
        /// </summary>
        MELSEC = 0,
        /// <summary>
        /// 汇川
        /// </summary>
        INOVANCE = 1,
        /// <summary>
        /// 欧姆龙
        /// </summary>
        OMRON = 2
    }
    /// <summary>
    /// 地址类型
    /// </summary>
    public enum EPLCOptType
    {
        /// <summary>
        /// 地址
        /// </summary>
        FINS = 0,
        /// <summary>
        /// 标签
        /// </summary>
        CIP = 1
    }
    /// <summary>
    /// 数据类型
    /// </summary>
    public enum EDataType
    {
        /// <summary>
        /// SHORT
        /// </summary>
        SHORT = 0,
        /// <summary>
        /// BOOL
        /// </summary>
        BOOL = 1,
        /// <summary>
        /// FLOAT
        /// </summary>
        FLOAT = 2,
        /// <summary>
        /// DOUBLE
        /// </summary>
        DOUBLE = 3,
        /// <summary>
        /// STRING
        /// </summary>
        STRING = 4,
        /// <summary>
        /// INT
        /// </summary>
        INT = 5,
        /// <summary>
        /// LONG
        /// </summary>
        LONG = 6,
        /// <summary>
        /// USHORT
        /// </summary>
        USHORT = 7,
        /// <summary>
        /// UINT
        /// </summary>
        UINT = 8,
        /// <summary>
        /// ULONG
        /// </summary>
        ULONG = 9
    }
}
